<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>PHP addcslashes() 函数</title>
</head>
<body>
<?php 
$str=addcslashes("a b c","d");
echo($str);
echo addcslashes("a","b");
?>
<?php
$str = "Welcome to Shanghai!";
echo $str."<br>";
echo addcslashes($str,'m')."<br>";
echo addcslashes($str,'H')."<br>";
?>
<?php
$str = "Welcome to Shanghai!";
echo $str."<br>";
echo addcslashes($str,'A..Z')."<br>";
echo addcslashes($str,'a..z')."<br>";
echo addcslashes($str,'a..g');
?>
</body>
</html>
<!-- addcslashes() 函数返回在指定字符前添加反斜杠的字符串 -->。